import axios from 'axios';
import { ElMessage } from 'element-plus';
const request = axios.create({
    baseURL: 'https://ceshi.zchczz.com/',
});
request.interceptors.request.use((config) => {
    return config;
});
// 添加响应拦截器
request.interceptors.response.use(
    (response) => {
        if (response.data.code != 0 && response.data.code != undefined) {
            ElMessage({ message: response.data.msg, type: 'error' });
        }
        return response.data;
    }
);
export {
    request
}